// Fill out your copyright notice in the Description page of Project Settings.


#include "UserWidget/WidgetComponent/SingleRewardWidget.h"
#include "Components/Border.h"
#include "Materials/MaterialInstance.h"

void USingleRewardWidget::NativeConstruct() {
	Super::NativeConstruct();
	RewardBG->SetBrushFromMaterial(RewardInfo.RewardIconBackground);
	RewardIcon->SetBrushFromTexture(RewardInfo.RewardIcon);
	RewardIcon->SetBrushColor(RewardInfo.RewardIcon->IsValidLowLevel()?FLinearColor(1.f,1.f,1.f,0.f): FLinearColor(1.f, 1.f, 1.f, 1.f));
}

void USingleRewardWidget::ConstructWidget(const FRewards& LRewardInfo) {
	RewardInfo = LRewardInfo;
}